package design.patterns.creational.factorymethod;

/**
 * @author gjx
 * @version v1.0
 * @Description 工厂方法模式
 * @date 2019/3/29 17:10
 */
public class Test {

    public static void main(String[] args) {
        ComputerFactory factory = new AppleComputerFactory();
        Computer computer = factory.getComputer();
        System.out.println(computer);

        factory = new LenovoComputerFactory();
        computer =factory.getComputer();
        System.out.println(computer);
    }
}
